package com.qf.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
public class ResultData<T> implements Serializable {

    //返回的结果码
    private int code = Code.SUCCESS;
    //返回的信息
    private String msg;
    //返回的数据
    private T data;

    /**
     * 返回的状态码枚举
     */
    public static interface Code{
        //成功的状态码
        int SUCCESS = 0;
        //错误的状态码
        int ERROR = -1;
    }

}
